make the testbuffer contain values in the range -0.25 .. 1.75 instead of
authorØyvind Kolås <ok@src.gnome.org>
Tue, 19 Feb 2008 12:50:08 +0000 (12:50 +0000)
committerØyvind Kolås <ok@src.gnome.org>
Tue, 19 Feb 2008 12:50:08 +0000 (12:50 +0000)
* babl/babl-fish-path.c: (test_create): make the testbuffer contain
values in the range -0.25 .. 1.75 instead of 0.0 .. 1.0, might fix
issues with wrong clamping of float->8bit conversions.

svn path=/trunk/; revision=279

ChangeLog
babl/babl-fish-path.c

index c6e5a666b181f69acfb474d5f546370f26d8bdf9..66b0b5d3981a205ee24c4dfa89fa1cf3ec1cf254 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-19  Øyvind Kolås  <pippin@gimp.org>
+
+       * babl/babl-fish-path.c: (test_create): make the testbuffer contain
+       values in the range -0.25 .. 1.75 instead of 0.0 .. 1.0, might fix
+       issues with wrong clamping of float->8bit conversions.
+
 2008-02-15  Øyvind Kolås  <pippin@gimp.org>
 
        * configure.ac: cleaned up win32 detection vs plug-in compilation
index 666c38bcb48c298e94c973431bbf9af238ac2f27..785a8d30803a97a0fc33836efc781a588b5a6de0 100644 (file)
@@ -437,7 +437,7 @@ test_create (void)
   test = babl_malloc (sizeof (double) * test_pixels * 4);
 
   for (i = 0; i < test_pixels * 4; i++)
-    test [i] = (double) random () / RAND_MAX;
+    test [i] = ((double) random () / RAND_MAX) * 2 - 0.25;
 
   return test;
 }